<!DOCTYPE>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/user_center.css">
	
    <title>我的收藏</title>
	 <script src="__PUBLIC__/Admin/js/jquery-1.9.1.js"></script>
    <script src="__PUBLIC__/Common/Layer/layer.js"></script>
</head>

<body>
<!-- 栏目 -->
<include file="Public:header_center" />

<!-- 内容 -->
<style>
	 .layui-layer{
        top:100px !important;
    }

    .col_detail{
        width: 250px;
        height:260px;
        border: 1px solid #CCCCCC;
        margin: 10px 5px;
        float: left;
    }

    .col_detail ul {
        width: 240px;
        margin: 5px auto;
    }


</style>
<div style="background-color:#f5f5f5;">
    <div class="content" style="width:1200px;">

        <include file="Public:left_center" />

        <div class="center-right right">
            <h3 class="title">我的收藏</h3>
            <div class="Options" style=" width:1050px; background-color:#FFF; padding:20px;">

                <div id="content"  style="overflow: hidden;zoom: 1">

                    <foreach name="res" item="vo">
                        <div class="col_detail" id="col_detail{$vo.id}">
                        <if condition="$vo.is_type == 1">
                            <ul>
                                <li><a target="_blank" href="{:U('Index/goods_details')}?id={$vo.goods_id}"><img src="__PUBLIC__/Uploads/goods/{$vo.pic_url}" alt="" style="width: 250px; height: 200px;"></a></li>
                                <li style="line-height: 25px;"><a href="{:U('Index/goods_details')}?id={$vo.goods_id}"><?php echo  utf8sub($vo['detail_title'],6).'...';?></a></li>
                                <li style="overflow: hidden">本店价：<span style="color: #FFAA25; font-weight: bold">{$vo.price_new}</span><p style="display: inline-block; float:right;"><a href="javascript:void (0);" onclick="del_coll({$vo.id})" style="padding:3px 10px; background:#CCC;">删除</a></li>
                            </ul>
                        </if>
                        <if condition="$vo.is_type == 2">
                            <ul>
                                <li><a target="_blank" href="{:U('Index/lvyou_details')}?id={$vo.goods_id}"><img src="__PUBLIC__/Uploads/goods/{$vo.pic_url}" alt="" style="width: 250px; height: 200px;"></a></li>
                                <li style="line-height: 25px;"><a href="{:U('Index/lvyou_details')}?id={$vo.goods_id}"><?php echo  utf8sub($vo['detail_title'],6).'...';?></a></li>
                                <li style="overflow: hidden">本店价：<span style="color: #FFAA25; font-weight: bold">{$vo.price_new}</span><p style="display: inline-block; float:right;"><a href="javascript:void (0);" onclick="del_coll({$vo.id})" style="padding:3px 10px; background:#CCC;">删除</a></li>
                            </ul>
                        </if>
                        </div>
                    </foreach>

                    </div>
                <div style="text-align:center;">
                    {$page}
                </div>

                </div>
            </div>

        </div>
    </div>
    <!-- 底部 -->
    <include file="Public:footer_center" />
</body>
<script>
    //删除
    function del_coll(id){
        $.post("{:U('User/del_collection')}", { "id": id },
                function(data){
                    if(data==1){
                        layer.msg('删除成功',function(){
                            $('#col_detail'+id).remove();
                        });
                    }else{
                        layer.msg('删除失败');
                    }
        }, "json");
    }

</script>
</html>
